// 电负荷预测-------------------------
let electricLoadX = [
  "00:00:00",
  "00:15:00",
  "00:30:00",
  "00:45:00",
  "01:00:00",
  "01:15:00",
  "01:30:00",
  "01:45:00",
  "02:00:00",
  "02:15:00",
  "02:30:00",
  "02:45:00",
  "03:00:00",
  "03:15:00",
  "03:30:00",
  "03:45:00",
  "04:00:00",
  "04:15:00",
  "04:30:00",
  "04:45:00",
  "05:00:00",
  "05:15:00",
  "05:30:00",
  "05:45:00",
  "06:00:00",
  "06:15:00",
  "06:30:00",
  "06:45:00",
  "07:00:00",
  "07:15:00",
  "07:30:00",
  "07:45:00",
  "08:00:00",
  "08:15:00",
  "08:30:00",
  "08:45:00",
  "09:00:00",
  "09:15:00",
  "09:30:00",
  "09:45:00",
  "10:00:00",
  "10:15:00",
  "10:30:00",
  "10:45:00",
  "11:00:00",
  "11:15:00",
  "11:30:00",
  "11:45:00",
  "12:00:00",
  "12:15:00",
  "12:30:00",
  "12:45:00",
  "13:00:00",
  "13:15:00",
  "13:30:00",
  "13:45:00",
  "14:00:00",
  "14:15:00",
  "14:30:00",
  "14:45:00",
  "15:00:00",
  "15:15:00",
  "15:30:00",
  "15:45:00",
  "16:00:00",
  "16:15:00",
  "16:30:00",
  "16:45:00",
  "17:00:00",
  "17:15:00",
  "17:30:00",
  "17:45:00",
  "18:00:00",
  "18:15:00",
  "18:30:00",
  "18:45:00",
  "19:00:00",
  "19:15:00",
  "19:30:00",
  "19:45:00",
  "20:00:00",
  "20:15:00",
  "20:30:00",
  "20:45:00",
  "21:00:00",
  "21:15:00",
  "21:30:00",
  "21:45:00",
  "22:00:00",
  "22:15:00",
  "22:30:00",
  "22:45:00",
  "23:00:00",
  "23:15:00",
  "23:30:00",
  "23:45:00",
]
let electricLoadY1 = []
let electricLoadY2 = [
  11821.74, 12258.65, 12676.16, 12446.04, 12672.82, 11979.84, 11855.61,
  11854.19, 11974, 12201.85, 12290.91, 12202.36, 11824.03, 11891.9, 12614.52,
  12077.22, 12261.09, 12656.09, 12109.46, 11881.91, 12663.36, 12552.85,
  12604.11, 12550.96, 11925.01, 12357.2, 11814, 11705.52, 11795.67, 13300.2,
  14018.53, 14898.84, 17142.26, 19288.07, 20781.85, 21608.68, 22132.81,
  23054.93, 23232.85, 24132.22, 23786.94, 24392.05, 24243.34, 24376.08,
  24081.15, 24749.02, 24476.38, 24805.5, 24462.56, 24001.95, 24849.51, 24879.15,
  23949.71, 24717.05, 24671.22, 23966.73, 24079.69, 24051.72, 24898.47,
  24245.23, 24337.14, 24378.48, 24855.52, 24226.21, 24665.08, 24264.42,
  24673.72, 24846.76, 24013.94, 24709.04, 24241.51, 24750.49, 24734.7, 24718.97,
  24122.34, 24275.15, 24454.24, 24144.14, 24460.58, 24035.11, 24598.55,
  23960.01, 24227.28, 23815.83, 23643.7, 22931.41, 22760.85, 21539.29, 20533.82,
  18657.39, 16524.66, 14490.9, 12323.91, 11875.38, 12075.35, 11946.83,
]

// 冷负载预测--------------------------------
let coldLoadX = electricLoadX
let coldLoadY1 = []
let coldLoadY2 = [
  1006.25, 1000.62, 1008.97, 998.43, 994.77, 1004.63, 1000.1, 1012.42, 1008.44,
  1021.96, 1022.25, 1028.56, 1021, 1028.88, 1026.36, 1043.91, 1036.14, 1032.58,
  1039.44, 1049.51, 1046.54, 1059.21, 1053.25, 1062.42, 1063.03, 1078.56,
  1083.99, 1083.48, 1101.24, 1120.8, 1150.42, 1180.81, 1241.91, 1286, 1316.49,
  1323.08, 1327.86, 1344.1, 1342.1, 1367.59, 1375.13, 1388.04, 1397.43, 1398.73,
  1417.37, 1429.05, 1429.17, 1433.49, 1453.56, 1453.35, 1477.75, 1476.53,
  1497.12, 1495.47, 1508.87, 1491.85, 1493.95, 1506.1, 1501.9, 1494.8, 1503.15,
  1495.96, 1503.52, 1509.19, 1498.57, 1490.99, 1502.78, 1507.49, 1490.72,
  1489.74, 1450.11, 1434.79, 1410, 1406.61, 1377.45, 1363.35, 1341.63, 1315.79,
  1290.54, 1276.97, 1262.97, 1231.88, 1219.83, 1198.99, 1186.21, 1157.21,
  1147.73, 1124.16, 1090.27, 1079.57, 1054.28, 1044.04, 1040.67, 1037.32,
  1028.21, 1028.04,
]

// 热负荷预测---------------------------------
let hotLoadX = electricLoadX
let hotLoadY1 = []
let hotLoadY2 = [
  79.78, 83.27, 78.95, 75.23, 79.06, 78.36, 78.33, 81.02, 84.4, 80.64, 82.13,
  75.25, 84.58, 79.26, 78.19, 82.16, 78.67, 84.5, 84.36, 77.25, 79.05, 80.42,
  78.23, 78.8, 79.99, 75.72, 83.95, 75.49, 84.6, 82.0, 85.0, 87.33, 90.0, 95.0,
  101.63, 97.38, 100.37, 98.74, 102.74, 98.9, 99.03, 102.35, 99.31, 102.28,
  102.22, 101.21, 100.74, 97.13, 102.35, 102.41, 102.25, 102.34, 98.85, 99.81,
  98.34, 97.62, 102.55, 100.57, 99.55, 101.08, 97.75, 100.48, 100.25, 101.67,
  99.58, 102.39, 99.02, 99.08, 97.73, 100.75, 99.71, 99.88, 99.15, 98.28, 98.26,
  97.91, 99.62, 102.61, 100.48, 101.3, 98.79, 99.9, 101.42, 98.12, 101.04,
  100.09, 101.04, 100.31, 100.78, 102.66, 101.83, 102.27, 101.97, 90.55, 85.62,
  80.71,
]

// 生物质价格预测--------------------------------
let biomassPriceX = []

// 动态设置x轴
let now2 = new Date()
// 当天天数
let day2 = now2.getDate() + 1
let year2 = now2.getFullYear()
let month2 = now2.getMonth()
// 本月总天数
let sumDay = new Date(year2, month2 + 1, 0).getDate()
console.log(sumDay, 111111)

for (let i = 0; i < 16; i++) {
  if (day2 - i < 1) {
    biomassPriceX.unshift(sumDay - i)
  } else {
    biomassPriceX.unshift(day2 - i)
  }
}
for (let i = 0; i < 16; i++) {
  if (day2 + i > sumDay) {
    biomassPriceX.push(day2 + i - sumDay)
  } else {
    biomassPriceX.push(day2 + i)
  }
}

// 定时器更新
setInterval(() => {
  biomassPriceX = []
  // 动态设置x轴
  let now2 = new Date()
  // 当天天数
  let day2 = now2.getDate()
  let year2 = now2.getFullYear()
  let month2 = now2.getMonth()
  // 本月总天数
  let sumDay = new Date(year2, month2 + 1, 0).getDate()

  for (let i = 0; i < 16; i++) {
    if (day2 - i < 1) {
      biomassPriceX.unshift(sumDay - i)
    } else {
      biomassPriceX.unshift(day2 - i)
    }
  }
  for (let i = 1; i < 16; i++) {
    if (day2 + i > sumDay) {
      biomassPriceX.push(day2 + i - sumDay)
    } else {
      biomassPriceX.push(day2 + i)
    }
  }
  console.log(111111111111111)
}, 1000 * 60 * 60)

let biomassPriceY1 = [
  804.92, 817.51, 789.48, 816.97, 807.41, 811.53, 784.29, 813.76, 805.31,
  816.48, 810.02, 793.44, 791.67, 795.82, 796.62,
]
let biomassPriceY2 = [
  804.92, 817.51, 789.48, 816.97, 807.41, 811.53, 784.29, 813.76, 805.31,
  816.48, 810.02, 793.44, 791.67, 795.82, 796.62, 793.14, 803.87, 781.78,
  799.99, 915.21, 898.34, 911.21, 911.82, 883.06, 883.27, 910.28, 888.38, 907.7,
  805.79, 789.99,
]
// 桉树皮价格变量
let casuarinaPriceY1 = [
  100.62, 102.19, 98.69, 102.12, 100.93, 101.44, 98.04, 101.72, 100.66, 102.06,
  101.25, 99.18, 98.96, 99.48, 99.57,
]
let casuarinaPriceY2 = [
  100.62, 102.19, 98.69, 102.12, 100.93, 101.44, 98.04, 101.72, 100.66, 102.06,
  101.25, 99.18, 98.96, 99.48, 99.57, 99.14, 100.48, 146.58, 149.99, 171.6,
  168.43, 170.85, 170.96, 165.57, 165.61, 170.67, 166.57, 170.19, 151.08, 98.74,
]

// 光伏出力---------------------------------
let pvOutputX = electricLoadX
let pvOutputY1 = []
let pvOutputY2 = [
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.13,
  44.4, 263.68, 646.66, 1124.59, 1656.91, 2364.61, 2830.82, 3669.97, 4044.31,
  4566.27, 5382.76, 5906.63, 6062.87, 7054.15, 7482.5, 7807.44, 8049.48,
  8614.31, 8962.95, 9444.86, 9667.59, 9854.93, 10363.99, 10573.49, 10454.91,
  10660.82, 10962.01, 10834.73, 10619.42, 10865.63, 10703.08, 10492.18,
  10030.22, 9994.06, 9363.42, 9089.81, 8686.22, 8095.41, 7938.27, 7150.75,
  6679.82, 5759.57, 5457.77, 5031.56, 4302.99, 3705.49, 2826.12, 2197.95,
  1596.67, 1034.9, 544.94, 183.01, 16.94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0,
]

// 风机出力---------------------------------
let windOutputX = electricLoadX
let windOutputY1 = []
let windOutputY2 = [
  1471.02, 1420.56, 1359.94, 1248.61, 1178.93, 1162.36, 1130.36, 1023.24,
  992.43, 1104.59, 1132.13, 1185.38, 1189.85, 1283.11, 1320.85, 1413.02,
  1493.43, 1537.78, 1529.75, 1574.59, 1705.63, 1732.26, 1840.12, 1848.53,
  1927.38, 1990.62, 2053.26, 2096.6, 2207.67, 2195.29, 2279.31, 2369.89,
  2456.44, 2419.25, 2365.01, 2323.95, 2301.94, 2343.26, 2349.67, 2308.25,
  2231.28, 2263.05, 2290.47, 2259.7, 2265.57, 2229.21, 2144.77, 2158.48,
  2215.67, 2150.19, 2170.52, 2113.08, 2091, 2133.73, 2144.67, 2157.18, 2143.69,
  2100.62, 1978.25, 1988.9, 1907.77, 1798.7, 1810.81, 1758.02, 1664.66, 1628.96,
  1627.97, 1563.07, 1481.62, 1435.18, 1416.27, 1426.44, 1410.05, 1342.05,
  1292.89, 1332.47, 1314.05, 1323.65, 1246.55, 1252.99, 1308.4, 1229.18, 1212.4,
  1205.82, 1208.25, 1169.19, 1166.66, 1204.68, 1146.12, 1124.42, 1116.22,
  1112.85, 1157.72, 1142.51, 1132.01, 1040.64,
]

// 地源热泵出力------------------------------
let geothermalOutputX = electricLoadX
let geothermalOutputY1 = []
let geothermalOutputY2 = [
  1238.32, 1236.44, 1239.22, 1235.71, 1234.49, 1237.78, 1236.27, 1240.37,
  1239.05, 1243.55, 1243.65, 1245.75, 1243.23, 1245.86, 1245.02, 1250.87,
  1248.28, 1247.09, 1249.38, 1252.74, 1251.75, 1255.97, 1253.98, 1257.04,
  1257.24, 1262.42, 1264.23, 1264.06, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1249.79, 1248.67,
  1245.64, 1245.58,
]
let geothermalOutputY1_1 = []
let geothermalOutputY1_2 = [
  1006.25, 1000.62, 1008.97, 998.43, 994.77, 1004.63, 1000.1, 1012.42, 1008.44,
  1021.96, 1022.25, 1028.56, 1021, 1028.88, 1026.36, 1043.91, 1036.14, 1032.58,
  1039.44, 1049.51, 1046.54, 1059.21, 1053.25, 1062.42, 1063.03, 1078.56,
  1083.99, 1083.48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1040.67, 1037.32,
  1028.21, 1028.04,
]

// 生物质供热---------------------------------
let biomassOutputX = electricLoadX
let biomassOutputY1 = []
let biomassOutputY2 = [
  78.22, 80.54, 76.0, 74.0, 78.71, 76.46, 69.06, 68.11, 70.04, 69.27, 71.77,
  70.05, 70.61, 68.06, 68.23, 68.76, 70.87, 71.14, 69.12, 68.38, 70.59, 70.54,
  70.02, 71.54, 71.33, 68.08, 69.72, 75.49, 84.6, 82.0, 85.0, 87.33, 90.0, 95.0,
  101.63, 97.38, 98.71, 97.89, 100.75, 98.87, 96.84, 99.53, 98.93, 99.75, 99.32,
  99.39, 100.5, 97.13, 100.87, 99.41, 100.67, 99.78, 98.85, 99.26, 98.34, 97.62,
  99.73, 100.57, 99.55, 99.32, 97.75, 100.48, 99.64, 100.61, 99.54, 99.85,
  99.02, 99.08, 97.73, 100.75, 99.3, 99.88, 99.14, 98.28, 98.26, 97.91, 99.62,
  101.18, 100.48, 99.81, 98.79, 99.23, 99.74, 98.12, 100.2, 100.09, 99.42,
  99.13, 100.57, 101.02, 100.9, 100.69, 99.69, 88.54, 84.88, 79.12,
]

// 电化学储能出力---------------------------------
let electrochemicalOutputX = electricLoadX
let electrochemicalOutputY1 = []
let electrochemicalOutputY2 = [
  0, 0, 0, 0, 2004.01, 1997.25, 1996.37, 1999.68, 1996.39, 1999.02, 2000.38,
  2004.68, 1997.99, 1998.43, 2000.86, 1997.46, 2002.36, 2002.92, 1997.35,
  2001.24, 1997.61, 2000.32, 1995.44, 1999.14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, -4995.59, -4999.71, -4998.25, -5002.65, -4997.2,
  -4997.95, -4999.2, -4995.73, 2499.1, 2500.92, 2503.07, 2499.83, 2500.12,
  2504.52, 2497.08, 2504.98, 2498.67, 2498.34, 2498.69, 2498.11, 2495.47,
  2504.2, 2499.28, 2502.54, 0, 0, 0, 0, -2500.33, -2496.66, -2497.98, -2499.38,
  -2503.65, -2499.25, -2499.06, -2496.7, -2496.68, -2503.11, -2497.64, -2498.46,
  -2496.92, -2497.43, -2497.3, -2496.88, 0, 0, 0, 0, 0, 0, 0, 0,
]

// 蓄冷出力---------------------------------
let chillerOutputX = electricLoadX
let chillerOutputY1 = []
let chillerOutputY2 = [
  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1101.24,
  1120.8, 1150.42, 1180.81, 1241.91, 1286.0, 1316.49, 1323.08, 1327.86, 1344.1,
  1342.1, 1367.59, 1375.13, 1388.04, 1397.43, 1398.73, 1417.37, 1429.05,
  1429.17, 1433.49, 1453.56, 1453.35, 1477.75, 1476.53, 1497.12, 1495.47,
  1508.87, 1491.85, 1493.95, 1506.1, 1501.9, 1494.8, 1503.15, 1495.96, 1503.52,
  1509.19, 1498.57, 1490.99, 1502.78, 1507.49, 1490.72, 1489.74, 1450.11,
  1434.79, 1410.0, 1406.61, 1377.45, 1363.35, 1341.63, 1315.79, 1290.54,
  1276.97, 1262.97, 1231.88, 1219.83, 1198.99, 1186.21, 1157.21, 1147.73,
  1124.16, 1090.27, 1079.57, 1054.28, 1044.04, 0.0, 0.0, 0.0, 0.0,
]

// 蓄热出力---------------------------------
let boilerOutputX = electricLoadX
let boilerOutputY1 = []
let boilerOutputY2 = [
  1.56, 2.73, 2.95, 1.23, 0.35, 1.9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.66, 0.85, 1.99, 0.03, 2.19,
  2.82, 0.38, 2.53, 3.21, 1.82, 0.24, 0.0, 1.48, 3.0, 1.58, 2.56, 0.0, 0.55,
  0.0, 0.0, 2.82, 0.0, 0.0, 1.76, 0.0, 0.0, 0.61, 1.06, 0.04, 2.54, 0.0, 0.0,
  0.0, 0.0, 0.41, 0.0, 0.01, 0.0, 0.0, 0.0, 0.0, 1.43, 0.0, 1.49, 0.0, 0.67,
  1.68, 0.0, 0.84, 0.0, 1.62, 1.18, 0.21, 1.64, 0.93, 1.58, 2.28, 2.01, 0.74,
  1.59,
]

let biomassOutputY1_1 = []
let biomassOutputY1_2 = [
  4.98, 5.02, 4.94, 5.06, 5.01, 5.03, 4.99, 4.93, 2001.98, 2000.24, 1999.56,
  2000.18, 1997.87, 1998.27, 1999.64, 1998.63, 2001.88, 2001.24, 2002.5,
  1997.49, 1997.78, 2001.78, 4.93, 4.9, 4.99, 5.02, 4.92, 4.97, 5.06, 5.01,
  4.93, 4.99, 4.95, 5.03, 5.02, 4.98, 5.08, 5, 4.96, 4.94, 5.1, 4.91, 5.04,
  5.05, 5.02, 5.04, 5.09, 4.97, 4.99, 5.1, 5.04, 5.06, 4.91, 4.95, 4.96, 4.98,
  5.09, 4.98, 4.98, 5.04, 5.04, 5.1, 4.96, 5.04, 5.02, 5, 4.99, 5.03, 5.06,
  5.06, 5.1, 4.97, 4.98, 4.9, 4.99, 4.9, 4.97, 5.04, 4.96, 4.91, 4.94, 5.04,
  4.9, 4.97, 5.01, 5.05, 4.97, 5.07, 4.95, 4.91, 4.93, 5.09, 5.02, 5.1, 5.03,
  4.9,
]

// LNG供热出力---------------------------------
let lngOutputX = electricLoadX
let lngOutputY1 = []
let lngOutputY2 = [
  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.27, 12.91, 14.36, 11.37, 10.36, 5.2, 13.97,
  11.2, 9.96, 13.4, 7.8, 13.36, 15.24, 8.87, 8.46, 9.88, 8.21, 7.26, 8.66, 7.64,
  14.23, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
  0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
]

let lngOutputY1_1 = []
let lngOutputY1_2 = [
  0, 0, 0, 0, 0, 0, 0.51, 0.71, 0.82, 0.64, 0.59, 0.27, 0.79, 0.62, 0.54, 0.74,
  0.42, 0.75, 0.86, 0.47, 0.48, 0.55, 0.45, 0.4, 0.46, 0.43, 0.8, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
]

// 看板数据
let lookArr1 = [
  "0.7219",
  "804.37",
  "91.55",
  "102.82",
  "398.53",
  "401.79",
  "550.26",
  "1855.91",
  "4.2",
  "4.1",
  "90.68%",
  "25.9",
  "0.51",
  "185.52",
  "82.35%",
  "21",
]

let lookArr2 = [
  "0.7219",
  "804.37",
  "91.55",
  "102.82",
  "399.25",
  "400.48",
  "549.95",
  "1855.91",
  "4.1",
  "4.1",
  "90.68%",
  "25.9",
  "0.5",
  "185.34",
  "82.35%",
  "21",
]

let lookArr3 = [
  "0.7219",
  "804.37",
  "91.55",
  "102.82",
  "398.98",
  "401.93",
  "551.78",
  "1855.91",
  "4.2",
  "4.1",
  "90.68%",
  "25.9",
  "0.51",
  "185.91",
  "82.35%",
  "21",
]

let lookArr4 = [
  "0.7219",
  "804.37",
  "91.55",
  "102.82",
  "399.16",
  "400.36",
  "548.21",
  "1855.91",
  "4.1",
  "4.1",
  "90.68%",
  "25.9",
  "0.5",
  "185.17",
  "82.35%",
  "21",
]
